1. Field of Invention
The present invention relates generally to mass digital data storage systems. More particularly, the present invention relates to systems and methods for allowing updated contents associated with logical pages of a logical block to be cached before being written into a physical block that corresponds to the logical block.
2. Description of the Related Art
The use of non-volatile memory systems such as flash memory storage systems is increasing due to the compact physical size of such memory systems, and the ability for non-volatile memory to be repetitively reprogrammed. The compact physical size of flash memory storage systems facilitates the use of such storage systems in devices which are becoming increasingly prevalent. Devices which use flash memory storage systems include, but are not limited to, digital cameras, digital camcorders, digital music players, handheld personal computers, and global positioning devices. The ability to repetitively reprogram non-volatile memory included in flash memory storage systems enables flash memory storage systems to be used and reused.
In general, flash memory storage systems may include flash memory cards and flash memory chip sets. Flash memory chip sets generally include flash memory components and a controller component. Typically, a flash memory chip set may be arranged to be assembled into an embedded system. The manufacturers of such assemblies or host systems typically acquire flash memory in component-form, as well as other components, then assemble the flash memory and the other components into a host system.
Logical blocks of a flash memory system are typically mapped to physical blocks. For instance, a logical block which includes 32 logical pages may be mapped to a physical block which includes 32 physical pages. When new or updated data associated with the logical block is to be written into the physical block and there is no available space in the physical block to accommodate the data, then a spare physical block is typically obtained. Once the spare physical block is obtained, the new or updated data is merged into the spare physical block with data from the original physical block.
FIG. 1 is a diagrammatic representation of a logical block with updated contents and physical blocks which may be obtained to accommodate the updated contents. At a time t1, a logical block ‘A’ 202 is updated such that new data is included in a third logical page 204c of logical block ‘A’ 202. When a physical block ‘A’ 212 is full to the extent that physical block ‘A’ 212 updated contents associated with third logical page 204c may not be written into physical block ‘A’ 212, a new physical block ‘B’ 222 may be obtained. The contents of substantially all physical pages 214 of physical block ‘A’ 212, with the exception of the contents of third physical page 214c, may be written into physical block ‘B’ 222, along with the updated contents associated with third logical page 204c. As a result, physical block ‘B’ 222 contains the most current data associated with logical block ‘A’ 202 at time t1. Once physical block ‘B’ 222 is written to, logical block 202 is mapped to physical block ‘B’ 222, and physical block ‘A’ 212 is typically erased. One conventional process of writing updated contents into a physical block will be discussed below with respect to FIG. 2.
At a time t2, logical block ‘A’ 202′, which is mapped to physical block ‘B’ 222, is updated such that contents associated with a first logical page 204a′ are either new or updated. Since physical block ‘B’ 222 is full or otherwise may not be updated to include contents associated with first logical page 204a′, a new physical block ‘C’ 232 may be obtained. The contents of substantially all physical pages 224 of physical block ‘B’ 222, aside from the contents of first physical page 224a, may be written into physical block ‘C’ 232 with the updated contents associated with first logical page 214a such that physical block ‘C’ 232 contains the most current data associated with logical block ‘A’ ‘202’ at time t2. Physical block ‘B’ 222 is generally erased after physical block ‘C’ 232 is written into and mapped to logical block ‘A’ 202′.
Referring next to FIG. 2, the steps associated with one method of writing updated contents of a page associated with a logical block into a physical block will be described. A process 250 of allowing an updated page associated with a logical block to be written into a physical block begins at step 254 in which a page, e.g., page ‘X,’ associated with logical block ‘A’ is updated. Updating page ‘X’ of logical block ‘A’ typically includes changing the contents associated with page ‘X.’ Once page ‘X’ of logical block ‘A’ is updated, a new physical block ‘B,’ which is to be mapped to or otherwise associated with logical block ‘A’ is obtained in step 258. New physical block ‘B’ may be obtained when a physical block which is currently associated with logical block ‘A’ does not have available space into which the updated contents of page ‘X’ may be written. As will be appreciated by those skilled in the art, new physical block ‘B’ may be obtained from a spare block pool.
In step 262, after new physical block ‘B’ is obtained, the old contents of a physical block ‘A’ which is currently associated with logical block ‘A’ are merged into physical block ‘B’ along with the updated contents of page ‘X’ of logical block ‘A.’ In other words, substantially all contents of physical block ‘A,’ except for the contents which were associated with page ‘X’ of logical block ‘A,’ are written into logical block ‘B’ with the updated contents of page ‘X’ of logical block ‘A.’ As such, physical block ‘B’ contains the most recent contents associated with logical block ‘A.’
After contents are written into physical block ‘B,’ physical block ‘A’ is erased in step 266, and disassociated from logical block ‘A’ in step 270. Once physical block ‘A’ is erased and disassociated from logical block ‘A,’ physical block ‘A’ is then typically available to be used as a spare block, and the process of allowing an updated page associated with a logical block to be written into a physical block is completed.
Typically, processes of writing contents into physical blocks and erasing contents of physical blocks are time consuming and may consume significant computational resources. Often, each time a logical page of a logical block is to be updated, one physical block is written into while another physical block is erased. As such, when there are many pages to be updated, there may be a substantially constant erasing of blocks, obtaining of new blocks, and writing of data into the new blocks. Constantly writing to blocks and erasing blocks may result in a relatively significant degradation of the performance of a memory system.
Therefore, what is needed is a method and an apparatus that enables the number of write and erase processes which occur in response to logical page updates to be reduced. Specifically, what is desired is a system which allows the volume of write and erase operations associated with performing updates in a physical block domain which correspond to updates in a logical block domain to be reduced substantially without compromising the ability to perform updates in the physical block domain.